<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>药店详情</title>
<jsp:include page="header.jsp"></jsp:include>
<style type="text/css">
	.my-bar {
		width: 100%;
		height: 42px;
		margin-top: 20px;
	}
	.my-add {
			display: block;
			border: none;
			width: 100%;
			height: 100%;
			line-height: 42px;
			font-size: 21px;
			color: #ffffff;
			text-align:center;
			background-color: red;
		}
</style>
</head>
<body>
	<form action="/phone/order_yaodian" method="post" id="myForm">
	<div class="weui-cell">
    <div class="weui-cell__hd"><label for="" class="weui-label">开始时间</label></div>
    <div class="weui-cell__bd">
      <input class="weui-input" type="text" value="" id="start" name="startTime">
    </div>
  </div>
  <div class="weui-cell">
    <div class="weui-cell__hd"><label for="" class="weui-label">结束时间</label></div>
    <div class="weui-cell__bd">
      <input class="weui-input" type="text" value="" placeholder="" id="end" name="endTime">
    </div>
  </div>
  <input class="weui-input" type="text" value="" placeholder="" id="end" name="endTime">
  </form>
  <div class="my-bar">
  	<a href="javascript:;" class="my-add">查询</a>
  </div>
  <jsp:include page="foot.jsp"></jsp:include>
  <script type="text/javascript">
  	$("#start").datetimePicker({
      	title: '开始时间',
     	min: "1990-12-12",
      	max: "2022-12-12 12:12",
      	onChange: function (picker, values, displayValues) {
      		console.log(values);
      	}
    	});
 
  	$("#end").datetimePicker({
      	title: '结束时间',
     	min: "1990-12-12",
      	max: "2022-12-12 12:12",
      	onChange: function (picker, values, displayValues) {
        	console.log(values);
      	}
    	});
  	$('.my-add').click(function(){
  		var start =$("#start").val();
  		var end =$("#end").val();
  		if(start==''&&end!=''){
  			$.toast("请同时选择开始和结束时间","text");
  			return false;
  		}
  		if(start!=''&&end==''){
  			$.toast("请同时选择开始和结束时间","text");
  			return false;
  		}
  		$('#myForm').submit();
  	});
  </script>
</body>
</html>